<?php

namespace App\Listeners\Subscriber;

use Illuminate\Events\Dispatcher;
use App\Events\Company\CreatedEvent;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;

class CompanyEvnetSubscriber implements ShouldQueue
{
	public function onCreated(CreatedEvent $event)
	{
		$company = $event->company;
    }

	/**
	 * 为订阅者注册监听器
	 *
	 * Date: 23/03/2018
	 * @author George
	 * @param Dispatcher $events
	 */
	public function subscribe(Dispatcher $events)
	{
		$events->listen(
			'App\Events\Company\CreatedEvent',
			'App\Listeners\Subscriber\CompanyEvnetSubscriber@onCreated'
		);
    }
}
